//统一管理用户接口
import request from '@/utils/request'
//引入类型
import type { loginFormData, loginResponseData, userInfoResponseData } from './type'

//暴露请求函数
//登录mock接口
// export const reqLoginAPI = (data:any) =>{
//     return request<any,any>({
//         url:'/user/login',
//         method:'POST',
//         data
//     })
// }
//登录接口
export const reqLoginAPI = (data:loginFormData) =>
  request.post<any, loginResponseData>('/admin/acl/index/login',data)
//获取用户信息接口
export const reqUserInfoAPI = () => {
  return request<any, userInfoResponseData>({
    url: '/admin/acl/index/info',
    method: 'GET',
  })
}
//退出登录接口
export const reqLogoutAPI = () => {
  return request<any, any>({
    url: '/admin/acl/index/logout',
    method: 'POST',
  })
}